package com.facishare.open.service;

import com.facishare.open.entity.User;
import com.facishare.open.mapper.UserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * Created by linchf on 2016/7/22.
 */
@Service
@Slf4j
@Transactional
public class UserService {
    @Resource
    private UserMapper userMapper;

    public int insert(User user) throws Exception {
        return userMapper.insert(user);
    }

    public int delete(User user) throws Exception {
        return userMapper.delete(user);
    }

    public int update(User user) throws Exception {
        return userMapper.update(user);
    }

    public User search(User user) throws Exception {
        return userMapper.search(user);
    }

    public List<User> searchLike(User user) throws Exception {
        return userMapper.searchLike(user);
    }


}
